/*
 * @Date: 2024-09-02 15:01:17
 * @LastEditors: lyx
 * @LastEditTime: 2024-09-02 15:09:01
 * @FilePath: \taro-template3\src\packageA\components\ChatBI\DownImg.tsx
 * @Description:
 */
import React from "react";
import { useTranslation } from "react-i18next";
import { downloadFile } from "@/utils/file";
import { Button, Divider } from "antd";

export interface IProps {
  imgArr: string[];
}

const DownImg: React.FC<IProps> = ({ imgArr }) => {
  console.log("DownImg imgArr", imgArr);
  const { t } = useTranslation();
  // Component Effect
  return (
    <div style={{ textAlign: "right" }}>
      <Button
        style={{ color: "#3556f7" }}
        type="primary"
        onClick={() => {
          imgArr.forEach((item) => {
            downloadFile(item);
          });
        }}
      >
        {t("common.download")}
      </Button>
    </div>
  );
};

export default DownImg;
